package cn.sanch.pet.service;

import cn.sanch.basic.util.PageList;
import cn.sanch.pet.domain.SearchMasterMsg;
import cn.sanch.basic.service.IBaseService;
import cn.sanch.pet.dto.MsgDto;
import cn.sanch.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Sanch
 * @since 2022-06-18
 */
public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {

    /**
     * 发布寻主消息
     * @param searchMasterMsg
     */
    void publish(SearchMasterMsg searchMasterMsg, HttpServletRequest request);

    /**
     * 门户页面【前台页面】用户查看自己发布的寻主消息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> user(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 后台页面查看待处理的寻主信息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> toHandle(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 拒绝订单
     * @param msgId
     */
    void reject(Long msgId);

    /**
     * 接单
     * @param msgDto
     */
    void accept(MsgDto msgDto);
}
